home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / -archivi / -recent2 / amicad_2.00.lha / AmiCAD / ARexx / Simulation.AmiCAD < prev    next >
Text File  |  1999-02-21  |  1KB  |  43 lines

  1. /* Lancement simulation analogique */
  2.  
  3. options results     /* indispensable pour récupérer le résultat des macros */
  4.  
  5. signal on error     /* pour l'interception des erreurs */
  6. signal on syntax
  7.  
  8. parse arg fichier
  9. if fichier="" then do
  10.     'REQFILE("Choix d''une netlist", "Spice", "*.cir")'
  11.     fichier=result
  12. end
  13. if fichier~="" then do
  14.     fichier_simulation='RAM:'||ParseFileName(fichier)||'_spice'
  15.     address command
  16.     'stack' " 64000"
  17.     'cd' " Travail:spice3f5"
  18.     arguments=fichier||' -b -r '||fichier_simulation||' >CON:100/100/500/300/Spice/CLOSE/WAIT/SCREENAmiCAD'
  19.     address command
  20.     'travail:spice3f5/bin/spice3f5full_040' arguments
  21.     /* 'execute' ' Travail:spice3f5/Simuler "'||fichier||'"' */
  22. end
  23.  
  24. exit
  25.  
  26. ParseFileName: procedure
  27.     parse arg FilePath, Part
  28.     DivPos = max(lastpos(':',FilePath),lastpos('/',FilePath))+1
  29.     if abbrev('FILE', upper(Part))
  30.     then return substr(FilePath, DivPos)
  31.     else
  32.     return strip(left(FilePath, DivPos-1),'T','/')
  33.  
  34. /* Traitement des erreurs, interruption du programme */
  35. syntax:
  36. erreur=RC
  37. 'MESSAGE("Erreur de syntaxe"+CHR(10)+"en ligne 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
  38. exit
  39.  
  40. error:
  41. 'MESSAGE("Erreur en ligne 'SIGL'")'
  42. exit
  43.